# Set up cross tools
AVRDUDE=avrdude -F -V
OBJCOPY=objcopy
CC=gcc
CPP=g++

RM=rm -f

# Params
MCU=atmega328p
F_CPU=16000000UL
BIN_FORMAT=ihex
PORT=/dev/ttyACM0
PART=ATmega328P
PROTOCOL=arduino
CFLAGS=-Wall -Os -DF_CPU=$(F_CPU) -Ilua -I. -fdata-sections -ffunction-sections
LDFLAGS=-Wl,--gc-sections

all:
	$(CPP) $(CFLAGS) -o luaarduino.exe $(LDFLAGS) luaarduino.cpp

clean:
	$(RM) luaarduino.exe main.lua.o

.PHONY: all clean upload
